package com.homework.action;

import java.sql.SQLException;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.ServletActionContext;

public class HomeworkGetAction {

	private String homeworkId;
	private String state;
	
	public String getHomeworkId() {
		return homeworkId;
	}

	public void setHomeworkId(String homeworkId) {
		this.homeworkId = homeworkId;
	}
	
	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}
	
	//作业列表_学生
	public String homeworkGet() throws SQLException {
		
		HttpServletRequest request = ServletActionContext.getRequest();
		request.setAttribute("homeworkId", homeworkId);//get不了值
		if(state.equals("ADD")){
			return "ADD";
		}
		else{
			return "MOD";
		}
	}

	





		
}
